<template>
<div>
  <h1>登录页面</h1>
  <p>账号<input type="text" v-model="form.username"></p>
  <p>密码<input type="text" v-model="form.password"></p>
  <button @click="add">确认</button>
</div>
</template>

<script>
export default {
  name: "qlogin",
  data(){
    return{
      form:{}
    }
  },
  methods:{
    add(){
      this.$axios.post("users/Qusers_API/",this.form)
      .then(i=>{
        if (i.data.code == 200){
          localStorage.setItem('userid',i.data.userid)
          this.$router.push({path:"/qgoods"})
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
